package com.yuanmeng.common.core.constant;

/**
 * 通用常量信息
 * 
 * @author 安然
 */
public class Constants {
    /**
     * UTF-8 字符集
     */
    public static final String   UTF8                            = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String   GBK                             = "GBK";

    /**
     * RMI 远程方法调用
     */
    public static final String   LOOKUP_RMI                      = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String   LOOKUP_LDAP                     = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String   LOOKUP_LDAPS                    = "ldaps:";

    /**
     * http请求
     */
    public static final String   HTTP                            = "http://";

    /**
     * https请求
     */
    public static final String   HTTPS                           = "https://";

    /**
     * 成功标记
     */
    public static final Integer  SUCCESS                         = 200;

    /**
     * 失败标记
     */
    public static final Integer  FAIL                            = 500;

    /**
     * 登录成功状态
     */
    public static final String   LOGIN_SUCCESS_STATUS            = "0";

    /**
     * 登录失败状态
     */
    public static final String   LOGIN_FAIL_STATUS               = "1";

    /**
     * 登录成功
     */
    public static final String   LOGIN_SUCCESS                   = "Success";

    /**
     * 退出登录
     */
    public static final String   LOGOUT                          = "Logout";

    /**
     * 退出登录
     */
    public static final String   DEREGISTER                      = "DEREGISTER";

    /**
     * 注册
     */
    public static final String   REGISTER                        = "Register";

    /**
     * 登录失败
     */
    public static final String   LOGIN_FAIL                      = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String   PAGE_NUM                        = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String   PAGE_SIZE                       = "pageSize";

    /**
     * 排序列
     */
    public static final String   ORDER_BY_COLUMN                 = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String   IS_ASC                          = "isAsc";

    /**
     * 验证码 redis key
     */
    public static final String   CAPTCHA_CODE_KEY                = "captcha_codes:";

    /**
     * 验证码有效期（分钟）
     */
    public static final long     CAPTCHA_EXPIRATION              = 2;

    /**
     * accessToken有效期（分钟）
     */
    public static final long     WX_ACCESS_TOKEN_EXPIRATION      = 60;

    /**
     * 参数管理 cache key
     */
    public static final String   SYS_CONFIG_KEY                  = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String   SYS_DICT_KEY                    = "sys_dict:";

    /**
     * 资源映射路径 前缀
     */
    public static final String   RESOURCE_PREFIX                 = "/profile";

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR               = { "com.yuanmeng" };

    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR                   = { "java.net.URL",
                                                                     "javax.naming.InitialContext",
                                                                     "org.yaml.snakeyaml",
                                                                     "org.springframework",
                                                                     "org.apache",
                                                                     "com.yuanmeng.common.core.utils.file" };

    /**
     * 用户默认等级
     */
    public static final String   DEFAULT_USER_LEVEL              = "user_default_level";

    /**
     * 用户等级
     */
    public static final String   USER_LEVEL_CACHE                = "user_level_cache";

    /**
     * 系统全局配置
     */
    public static final String   GLOBAL_SYSTEM_SETTING           = "global_system_setting";

    /**
     * 签到积分配置
     */
    public static final String   SIGN_SETTING                    = "sign_setting";

    /**
     * 积分配置
     */
    public static final String   POINT_SETTING                   = "point_setting";

    /**
     * 分销配置
     */
    public static final String   DISTRIBUTION_SETTING            = "distribution_setting";

    /**
     * 秒杀活动keY
     */
    public static final String   SPIKE_ACTIVE_KEY                = "spike_stock_info:";

    /**
     * 秒杀活动红包keY
     */
    public static final String   SPIKE_ACTIVE_RED_ENVELOPE_KEY   = "spike_red_envelope_info:";

    /**
     * 拼团活动团队keY
     */
    public static final String   GROUP_ACTIVE_TEAM_KEY           = "group_active_team_info:";

    /**
     * 秒杀活动获得积分红包记录订单号前缀
     */
    public static final String   SPIKE_ACTIVE_POINT_ORDER        = "RP_";

    /**
     * 积分签到获得积分记录订单号前缀
     */
    public static final String   SIGN_POINT_ORDER                = "SP_";

    /**
     * 商户部门及角色缓存key
     */
    public static final String   MERCHANT_DEPT_AND_ROLE_INFO_KEY = "merchant_dept_role:";

    /**
     * 公共文件上传次数校验key
     */
    public static final String   PUBLIC_FILE_UPLOAD_KEY          = "public_file_upload_to_oss_key:";

    /**
     * admin默认密码
     */
    public static final String   ADMIN_USER_DEFAULT_PASSWORD     = "123456";

    /**
     * 用户默认好评
     */
    public static final String   DEFAULT_COMMENT_INFO            = "用户默认好评！";

    /**
     * 微信小程序二维码生成key
     */
    public static final String   WX_APPLET_QR_CODE_KEY           = "QR:";

    /**
     * 微信小程序用户accessToken
     */
    public static final String   WX_APPLET_USER_ACCESS_TOKEN_KEY = "wx_user_access_token:";

    /**
     * 会员卡信息key
     */
    public static final String   CARD_INFO_KEY                   = "card_info_key";

    /**
     * 用户喜欢短视频列表key
     */
    public static final String   USER_LIKE_VIDEO_KEY             = "user_like_video:";

    /**
     * 用户关注视频博主key
     */
    public static final String   USER_FOLLOW_VIDEO_BLOGGER_KEY   = "user_follow_blogger:";

    /**
     * 用户短信验证码key
     */
    public static final String   VERIFY_CODE_PHONE               = "VERIFY_CODE_PHONE:";
}
